﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Administration;

namespace LeastPrivilege.CustomBasicAuthentication
{
    public class AnonymousAuthenticationSection : ConfigurationSection
    {
        public static string SectionName = "system.webServer/security/authentication/anonymousAuthentication";

        public bool Enabled
        {
            get { return (bool)base["enabled"]; }
            set { base["enabled"] = (bool)value; }
        }
        public string UserName
        {
            get { return (string)base["userName"]; }
            set { base["userName"] = (string)value; }
        }
        public string Password
        {
            get { return (string)base["password"]; }
            set { base["password"] = (string)value; }
        }
        public EnumAnonymousAuthenticationLogonMethod LogonMethod
        {
            get { return (EnumAnonymousAuthenticationLogonMethod)base["logonMethod"]; }
            set { base["logonMethod"] = (int)value; }
        }
    }
    public enum EnumAnonymousAuthenticationLogonMethod
    {
        Interactive = 0,
        Batch = 1,
        Network = 2,
        ClearText = 3
    }
}
